package acm2;

import java.util.*;
class TheDrunkJailer{
	public static void main(String[] t){
		Scanner s = new Scanner(System.in);
		for(int i=s.nextInt(); i>0; i--)
		{
			int n = s.nextInt();
			System.out.println(n<100?n<81?n<64?n<49?n<36?n<25?n<16?n<9?2:3:4:5:6:7:8:9:10);
		}
	}
}
